using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class ResponseXML : System.Web.UI.Page
{
    protected SqlCommand cmd=new SqlCommand();
    protected DataSet ds=new DataSet();
   // protected DBProvider db=new DBProvider();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Id");
            dt.Columns.Add("Name");
            for (int i = 0; i < 10; i++)
            {
                DataRow dtr = dt.NewRow();
                dtr[0] = "Id_" + i.ToString();
                dtr[1] = "Name_" + i.ToString();
                dt.Rows.Add(dtr);
            }
            DataSet ds = new DataSet();
            ds.Tables.Add(dt);
            Response.ContentType = "text/xml";
            Response.Write(ds.GetXml());

           /* cmd.CommandText = "sp_LayTatCaTour";
            cmd.Parameters.Clear();
            cmd.CommandType = CommandType.StoredProcedure;
          //  ds = db.GetDataSet(cmd);
            Response.ContentType = "text/xml";
            Response.Write(ds.GetXml());
 */
        }

    }
}
